package com.ddone.ioc;

import com.ddone.ioc.annotation.bean.Book;
import com.ddone.ioc.annotation.config.AnnoConfig;
import com.ddone.ioc.annotation.controller.BookController;
import org.junit.Test;
import org.junit.runner.RunWith;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.test.context.ContextConfiguration;
import org.springframework.test.context.junit4.SpringJUnit4ClassRunner;

/**
 * @author ddone
 * @date 2024/3/19-18:13
 */
@RunWith(SpringJUnit4ClassRunner.class)
@ContextConfiguration(classes = {AnnoConfig.class})
public class TestSSMAnno {
    @Autowired
    private BookController bookController;
    @Test
    public void testSSM(){
        Book book = Book.builder().name("简爱").price("20.5").build();
        bookController.addBook(book);
    }

}
